<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="https://unpkg.com/vue@next"></script>
</head>

<body>
    <div id="app">
        <!-- keyup.enter,keyup为键盘弹起事件，enter是vue封装好的修饰符，指回车 -->
        <!-- <input type="text" v-model="ipt" @keyup.enter="handleClick">
        <button @click="handleClick">点击添加内容</button>
        <div v-for="item in arr">
            {{item}}
        </div> -->

        <input type="checkbox" v-model="checkIpt" value="apple">苹果
        <input type="checkbox" v-model="checkIpt" value="watermelon">西瓜
        <input type="checkbox" v-model="checkIpt" value="pineapple">菠萝
        <button @click="handleClick">点击获取Value</button>
    </div>
</body>
<script>
    let vm = {
        data () {
            return {
                checkIpt: [],
                ipt: '',
                arr: ['GalaxySa', 'SliverTrain', 'FoggySea']
            }
        },
        methods: {
            handleClick () {
                console.log(this.checkIpt);
            }
        }
    }
    Vue.createApp(vm).mount('#app')
</script>

</html>